package com.ityshow.uaa.service.dto;


import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the OauthAccessToken entity.
 */
public class OauthAccessTokenDTO implements Serializable {

    private Long id;

    @NotNull
    private String tokenId;

    private String token;

    @NotNull
    private String authenticationId;

    private String userName;

    private String clientId;

    private String authentication;

    private String refreshToken;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getTokenId() {
        return tokenId;
    }

    public void setTokenId(String tokenId) {
        this.tokenId = tokenId;
    }
    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
    public String getAuthenticationId() {
        return authenticationId;
    }

    public void setAuthenticationId(String authenticationId) {
        this.authenticationId = authenticationId;
    }
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    public String getAuthentication() {
        return authentication;
    }

    public void setAuthentication(String authentication) {
        this.authentication = authentication;
    }
    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        OauthAccessTokenDTO oauthAccessTokenDTO = (OauthAccessTokenDTO) o;

        if ( ! Objects.equals(id, oauthAccessTokenDTO.id)) { return false; }

        return true;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "OauthAccessTokenDTO{" +
            "id=" + id +
            ", tokenId='" + tokenId + "'" +
            ", token='" + token + "'" +
            ", authenticationId='" + authenticationId + "'" +
            ", userName='" + userName + "'" +
            ", clientId='" + clientId + "'" +
            ", authentication='" + authentication + "'" +
            ", refreshToken='" + refreshToken + "'" +
            '}';
    }
}
